home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / QuickdrawText.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  5.2 KB  |  319 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QuickdrawText.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__QUICKDRAWTEXT__') = 'UNDEFINED' THEN
  18. __QUICKDRAWTEXT__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  27.     include 'MixedMode.a'
  28.     ENDIF
  29.  
  30. ; CharToPixel directions 
  31. leftCaret                        EQU        0                    ;Place caret for left block
  32. rightCaret                        EQU        -1                    ;Place caret for right block
  33. hilite                            EQU        1                    ;Direction is SysDirection
  34. smLeftCaret                        EQU        0                    ;Place caret for left block - obsolete 
  35. smRightCaret                    EQU        -1                    ;Place caret for right block - obsolete 
  36. smHilite                        EQU        1                    ;Direction is TESysJust - obsolete 
  37. ;Constants for styleRunPosition argument in PortionLine, DrawJustified,
  38. ; MeasureJustified, CharToPixel, and PixelToChar.
  39. onlyStyleRun                    EQU        0                    ; This is the only style run on the line 
  40. leftStyleRun                    EQU        1                    ; This is leftmost of multiple style runs on the line 
  41. rightStyleRun                    EQU        2                    ; This is rightmost of multiple style runs on the line 
  42. middleStyleRun                    EQU        3                    ; There are multiple style runs on the line and this 
  43. ; is neither the leftmost nor the rightmost. 
  44. smOnlyStyleRun                    EQU        0                    ; obsolete 
  45. smLeftStyleRun                    EQU        1                    ; obsolete 
  46. smRightStyleRun                    EQU        2                    ; obsolete 
  47. smMiddleStyleRun                EQU        3                    ; obsolete 
  48.  
  49. ; type for styleRunPosition parameter in PixelToChar etc. 
  50. FontInfo                 RECORD    0
  51. ascent                     ds.w    1
  52. descent                     ds.w    1
  53. widMax                     ds.w    1
  54. leading                     ds.w    1
  55. sizeof                     EQU    8
  56.                         ENDR
  57.  
  58. OffPair                 RECORD    0
  59. offFirst                 ds.w    1
  60. offSecond                 ds.w    1
  61. sizeof                     EQU    4
  62.                         ENDR
  63.  
  64.     IF GENERATING68K THEN
  65.         Macro
  66.         _Pixel2Char
  67.             dc.w     $2F3C
  68.             dc.w     $820E
  69.             dc.w     $0014
  70.             dc.w     $A8B5
  71.         EndM
  72.     ELSE
  73.         IMPORT    Pixel2Char
  74.     ENDIF
  75.  
  76.     IF GENERATING68K THEN
  77.         Macro
  78.         _Char2Pixel
  79.             dc.w     $2F3C
  80.             dc.w     $820C
  81.             dc.w     $0016
  82.             dc.w     $A8B5
  83.         EndM
  84.     ELSE
  85.         IMPORT    Char2Pixel
  86.     ENDIF
  87.  
  88.     IF GENERATING68K THEN
  89.         Macro
  90.         _PixelToChar
  91.             dc.w     $2F3C
  92.             dc.w     $8222
  93.             dc.w     $002E
  94.             dc.w     $A8B5
  95.         EndM
  96.     ELSE
  97.         IMPORT    PixelToChar
  98.     ENDIF
  99.  
  100.     IF GENERATING68K THEN
  101.         Macro
  102.         _CharToPixel
  103.             dc.w     $2F3C
  104.             dc.w     $821C
  105.             dc.w     $0030
  106.             dc.w     $A8B5
  107.         EndM
  108.     ELSE
  109.         IMPORT    CharToPixel
  110.     ENDIF
  111.  
  112.     IF GENERATING68K THEN
  113.         Macro
  114.         _DrawJustified
  115.             dc.w     $2F3C
  116.             dc.w     $8016
  117.             dc.w     $0032
  118.             dc.w     $A8B5
  119.         EndM
  120.     ELSE
  121.         IMPORT    DrawJustified
  122.     ENDIF
  123.  
  124.     IF GENERATING68K THEN
  125.         Macro
  126.         _MeasureJustified
  127.             dc.w     $2F3C
  128.             dc.w     $801A
  129.             dc.w     $0034
  130.             dc.w     $A8B5
  131.         EndM
  132.     ELSE
  133.         IMPORT    MeasureJustified
  134.     ENDIF
  135.  
  136.     IF GENERATING68K THEN
  137.         Macro
  138.         _PortionLine
  139.             dc.w     $2F3C
  140.             dc.w     $8412
  141.             dc.w     $0036
  142.             dc.w     $A8B5
  143.         EndM
  144.     ELSE
  145.         IMPORT    PortionLine
  146.     ENDIF
  147.  
  148.     IF GENERATING68K THEN
  149.         Macro
  150.         _HiliteText
  151.             dc.w     $2F3C
  152.             dc.w     $800E
  153.             dc.w     $001C
  154.             dc.w     $A8B5
  155.         EndM
  156.     ELSE
  157.         IMPORT    HiliteText
  158.     ENDIF
  159.  
  160.     IF GENERATING68K THEN
  161.         Macro
  162.         _DrawJust
  163.             dc.w     $2F3C
  164.             dc.w     $8008
  165.             dc.w     $001E
  166.             dc.w     $A8B5
  167.         EndM
  168.     ELSE
  169.         IMPORT    DrawJust
  170.     ENDIF
  171.  
  172.     IF GENERATING68K THEN
  173.         Macro
  174.         _MeasureJust
  175.             dc.w     $2F3C
  176.             dc.w     $800C
  177.             dc.w     $0020
  178.             dc.w     $A8B5
  179.         EndM
  180.     ELSE
  181.         IMPORT    MeasureJust
  182.     ENDIF
  183.  
  184.     IF GENERATING68K THEN
  185.         Macro
  186.         _PortionText
  187.             dc.w     $2F3C
  188.             dc.w     $8408
  189.             dc.w     $0024
  190.             dc.w     $A8B5
  191.         EndM
  192.     ELSE
  193.         IMPORT    PortionText
  194.     ENDIF
  195.  
  196.     IF GENERATING68K THEN
  197.         Macro
  198.         _VisibleLength
  199.             dc.w     $2F3C
  200.             dc.w     $8408
  201.             dc.w     $0028
  202.             dc.w     $A8B5
  203.         EndM
  204.     ELSE
  205.         IMPORT    VisibleLength
  206.     ENDIF
  207.  
  208.     IF GENERATING68K THEN
  209.         Macro
  210.         _GetFormatOrder
  211.             dc.w     $2F3C
  212.             dc.w     $8012
  213.             dc.w     $FFFC
  214.             dc.w     $A8B5
  215.         EndM
  216.     ELSE
  217.         IMPORT    GetFormatOrder
  218.     ENDIF
  219.  
  220.     IF GENERATING68K THEN
  221.         _TextFont:    OPWORD    $A887
  222.     ELSE
  223.         IMPORT    TextFont
  224.     ENDIF
  225.  
  226.     IF GENERATING68K THEN
  227.         _TextFace:    OPWORD    $A888
  228.     ELSE
  229.         IMPORT    TextFace
  230.     ENDIF
  231.  
  232.     IF GENERATING68K THEN
  233.         _TextMode:    OPWORD    $A889
  234.     ELSE
  235.         IMPORT    TextMode
  236.     ENDIF
  237.  
  238.     IF GENERATING68K THEN
  239.         _TextSize:    OPWORD    $A88A
  240.     ELSE
  241.         IMPORT    TextSize
  242.     ENDIF
  243.  
  244.     IF GENERATING68K THEN
  245.         _SpaceExtra:    OPWORD    $A88E
  246.     ELSE
  247.         IMPORT    SpaceExtra
  248.     ENDIF
  249.  
  250.     IF GENERATING68K THEN
  251.         _DrawChar:    OPWORD    $A883
  252.     ELSE
  253.         IMPORT    DrawChar
  254.     ENDIF
  255.  
  256.     IF GENERATING68K THEN
  257.         _DrawString:    OPWORD    $A884
  258.     ELSE
  259.         IMPORT    DrawString
  260.     ENDIF
  261.  
  262.     IF GENERATING68K THEN
  263.         _DrawText:    OPWORD    $A885
  264.     ELSE
  265.         IMPORT    DrawText
  266.     ENDIF
  267.  
  268.     IF GENERATING68K THEN
  269.         _CharWidth:    OPWORD    $A88D
  270.     ELSE
  271.         IMPORT    CharWidth
  272.     ENDIF
  273.  
  274.     IF GENERATING68K THEN
  275.         _StringWidth:    OPWORD    $A88C
  276.     ELSE
  277.         IMPORT    StringWidth
  278.     ENDIF
  279.  
  280.     IF GENERATING68K THEN
  281.         _TextWidth:    OPWORD    $A886
  282.     ELSE
  283.         IMPORT    TextWidth
  284.     ENDIF
  285.  
  286.     IF GENERATING68K THEN
  287.         _MeasureText:    OPWORD    $A837
  288.     ELSE
  289.         IMPORT    MeasureText
  290.     ENDIF
  291.  
  292.     IF GENERATING68K THEN
  293.         _GetFontInfo:    OPWORD    $A88B
  294.     ELSE
  295.         IMPORT    GetFontInfo
  296.     ENDIF
  297.  
  298.     IF GENERATING68K THEN
  299.         _CharExtra:    OPWORD    $AA23
  300.     ELSE
  301.         IMPORT    CharExtra
  302.     ENDIF
  303.  
  304.     IF GENERATING68K THEN
  305.         _StdText:    OPWORD    $A882
  306.     ELSE
  307.         IMPORT    StdText
  308.     ENDIF
  309.  
  310.     IF GENERATING68K THEN
  311.         _StdTxMeas:    OPWORD    $A8ED
  312.     ELSE
  313.         IMPORT    StdTxMeas
  314.     ENDIF
  315.  
  316.     IF OLDROUTINENAMES  THEN
  317.     ENDIF
  318.     ENDIF ; __QUICKDRAWTEXT__
  319.